load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "kvprober",
    srcs = [
        "kvprober.go",
        "planner.go",
        "quarantine_pool.go",
        "settings.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvprober",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/keys",
        "//pkg/kv",
        "//pkg/kv/kvpb",
        "//pkg/roachpb",
        "//pkg/settings",
        "//pkg/settings/cluster",
        "//pkg/util/log",
        "//pkg/util/log/logcrash",
        "//pkg/util/metric",
        "//pkg/util/randutil",
        "//pkg/util/stop",
        "//pkg/util/syncutil",
        "//pkg/util/timeutil",
        "//pkg/util/tracing",
        "//pkg/util/tracing/tracingpb",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_logtags//:logtags",
    ],
)

go_test(
    name = "kvprober_test",
    srcs = [
        "helpers_test.go",
        "kvprober_integration_test.go",
        "kvprober_test.go",
        "main_test.go",
        "planner_test.go",
        "quarantine_pool_test.go",
    ],
    embed = [":kvprober"],
    deps = [
        "//pkg/base",
        "//pkg/keys",
        "//pkg/kv",
        "//pkg/kv/kvpb",
        "//pkg/kv/kvserver",
        "//pkg/roachpb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/settings/cluster",
        "//pkg/testutils",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/skip",
        "//pkg/testutils/testcluster",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/log/logpb",
        "//pkg/util/randutil",
        "//pkg/util/syncutil",
        "//pkg/util/timeutil",
        "//pkg/util/tracing",
        "//pkg/util/tracing/tracingpb",
        "//pkg/util/uuid",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_stretchr_testify//require",
        "@org_golang_google_grpc//codes",
    ],
)
